from sqlalchemy import *
from datetime import datetime
from until.ext import Base


class User(Base):
    __tablename__ = "user"
    id = Column(Integer, primary_key=True)
    drivce_id = Column(String(120), default=None, nullable=False, comment="设备id")
    use_date = Column(String(20), default=None, nullable=False, comment="过期时间")
    join_time = Column(DateTime,  nullable=False, comment="注册时间")

    # def __repr__(self):
    #     Name = self.drivce_id
    #     Phone = self.use_date
    #     Country = self.join_time
    #     return f"User: name: {Name}, phone: {Phone}, country: {Country}"
